﻿namespace HRM.CORE.REPORT
{
    using APP.HELPER.Utils.Security;
    using DevExpress.Utils;
    using DevExpress.XtraPrinting;
    using DevExpress.XtraReports.UI;
    using HRM.CORE;
    using System; using Extra.ERP;
    using System.ComponentModel;
    using System.Drawing;
    using System.Drawing.Printing;

    public class rptDisciplineByEmployee : XtraReport
    {
        private BottomMarginBand BottomMargin;
        private IContainer components;
        private DetailBand Detail;
        private Guid m_DisciplineID;
        private string m_EmployeeCode;
        private PageFooterBand PageFooter;
        private XRPictureBox picEmployee;
        private XRPictureBox ptPhoto;
        private TopMarginBand TopMargin;
        private XRLabel txtAddress;
        private XRLabel txtCompany;
        private XRLabel txtDate;
        private XRRichText txtDateOccurred;
        private XRRichText txtDescription;
        private XRLabel txtEmployeeCode;
        private XRRichText txtEmployeeName;
        private XRRichText txtForm;
        private XRRichText txtLocation;
        private XRRichText txtNotes;
        private XRRichText txtPosition;
        private XRRichText txtReason;
        private XRRichText txtSettlement;
        private XRRichText txtViolations;
        private XRRichText txtWitnesses;
        private XRLabel xrLabel1;
        private XRLabel xrLabel10;
        private XRLabel xrLabel11;
        private XRLabel xrLabel12;
        private XRLabel xrLabel13;
        private XRLabel xrLabel14;
        private XRLabel xrLabel15;
        private XRLabel xrLabel16;
        private XRLabel xrLabel2;
        private XRLabel xrLabel3;
        private XRLabel xrLabel4;
        private XRLabel xrLabel5;
        private XRLabel xrLabel6;
        private XRLabel xrLabel7;
        private XRLabel xrLabel8;
        private XRLabel xrLabel9;
        private XRTable xrTable1;
        private XRTableCell xrTableCell1;
        private XRTableCell xrTableCell2;
        private XRTableCell xrTableCell3;
        private XRTableCell xrTableCell4;
        private XRTableCell xrTableCell5;
        private XRTableCell xrTableCell6;
        private XRTableRow xrTableRow1;
        private XRTableRow xrTableRow2;

        public rptDisciplineByEmployee()
        {
            this.m_EmployeeCode = "";
            this.m_DisciplineID = Guid.Empty;
            this.components = null;
            this.InitializeComponent();
        }

        public rptDisciplineByEmployee(Guid Discipline, string EmployeeCode)
        {
            this.m_EmployeeCode = "";
            this.m_DisciplineID = Guid.Empty;
            this.components = null;
            this.InitializeComponent();
            this.m_DisciplineID = Discipline;
            this.m_EmployeeCode = EmployeeCode;
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(rptDisciplineByEmployee));
            this.Detail = new DetailBand();
            this.txtEmployeeCode = new XRLabel();
            this.txtViolations = new XRRichText();
            this.txtSettlement = new XRRichText();
            this.picEmployee = new XRPictureBox();
            this.xrLabel16 = new XRLabel();
            this.xrLabel15 = new XRLabel();
            this.xrLabel14 = new XRLabel();
            this.txtReason = new XRRichText();
            this.txtNotes = new XRRichText();
            this.txtForm = new XRRichText();
            this.txtWitnesses = new XRRichText();
            this.txtDescription = new XRRichText();
            this.txtLocation = new XRRichText();
            this.txtDateOccurred = new XRRichText();
            this.txtPosition = new XRRichText();
            this.txtEmployeeName = new XRRichText();
            this.xrTable1 = new XRTable();
            this.xrTableRow1 = new XRTableRow();
            this.xrTableCell1 = new XRTableCell();
            this.xrTableCell2 = new XRTableCell();
            this.xrTableCell3 = new XRTableCell();
            this.xrTableRow2 = new XRTableRow();
            this.xrTableCell4 = new XRTableCell();
            this.xrTableCell5 = new XRTableCell();
            this.xrTableCell6 = new XRTableCell();
            this.xrLabel13 = new XRLabel();
            this.xrLabel12 = new XRLabel();
            this.xrLabel11 = new XRLabel();
            this.xrLabel10 = new XRLabel();
            this.xrLabel9 = new XRLabel();
            this.xrLabel8 = new XRLabel();
            this.xrLabel7 = new XRLabel();
            this.xrLabel6 = new XRLabel();
            this.xrLabel5 = new XRLabel();
            this.xrLabel3 = new XRLabel();
            this.xrLabel1 = new XRLabel();
            this.xrLabel4 = new XRLabel();
            this.txtCompany = new XRLabel();
            this.txtDate = new XRLabel();
            this.xrLabel2 = new XRLabel();
            this.txtAddress = new XRLabel();
            this.ptPhoto = new XRPictureBox();
            this.TopMargin = new TopMarginBand();
            this.BottomMargin = new BottomMarginBand();
            this.PageFooter = new PageFooterBand();
            this.txtViolations.BeginInit();
            this.txtSettlement.BeginInit();
            this.txtReason.BeginInit();
            this.txtNotes.BeginInit();
            this.txtForm.BeginInit();
            this.txtWitnesses.BeginInit();
            this.txtDescription.BeginInit();
            this.txtLocation.BeginInit();
            this.txtDateOccurred.BeginInit();
            this.txtPosition.BeginInit();
            this.txtEmployeeName.BeginInit();
            this.xrTable1.BeginInit();
            this.BeginInit();
            this.Detail.Controls.AddRange(new XRControl[] { 
                this.txtEmployeeCode, this.txtViolations, this.txtSettlement, this.picEmployee, this.xrLabel16, this.xrLabel15, this.xrLabel14, this.txtReason, this.txtNotes, this.txtForm, this.txtWitnesses, this.txtDescription, this.txtLocation, this.txtDateOccurred, this.txtPosition, this.txtEmployeeName, 
                this.xrTable1, this.xrLabel13, this.xrLabel12, this.xrLabel11, this.xrLabel10, this.xrLabel9, this.xrLabel8, this.xrLabel7, this.xrLabel6, this.xrLabel5, this.xrLabel3, this.xrLabel1, this.xrLabel4, this.txtCompany, this.txtDate, this.xrLabel2, 
                this.txtAddress, this.ptPhoto
             });
            this.Detail.Font = new Font("Times New Roman", 9.75f);
            this.Detail.HeightF = 660f;
            this.Detail.Name = "Detail";
            this.Detail.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.Detail.PageBreak = PageBreak.AfterBand;
            this.Detail.StylePriority.UseFont = false;
            this.Detail.TextAlignment = TextAlignment.TopLeft;
            this.txtEmployeeCode.LocationFloat = new PointFloat(10.41668f, 191.1251f);
            this.txtEmployeeCode.Name = "txtEmployeeCode";
            this.txtEmployeeCode.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtEmployeeCode.SizeF = new SizeF(89.79235f, 16.75f);
            this.txtEmployeeCode.StylePriority.UseTextAlignment = false;
            this.txtEmployeeCode.Text = "txtEmployeeCode";
            this.txtEmployeeCode.TextAlignment = TextAlignment.MiddleCenter;
            this.txtViolations.Font = new Font("Times New Roman", 12f, FontStyle.Italic, GraphicsUnit.Point, 0);
            this.txtViolations.LocationFloat = new PointFloat(422.9864f, 367.7084f);
            this.txtViolations.Name = "txtViolations";
            this.txtViolations.SerializableRtfString = manager.GetString("txtViolations.SerializableRtfString");
            this.txtViolations.SizeF = new SizeF(324.0132f, 18.83334f);
            this.txtViolations.StylePriority.UseFont = false;
            this.txtSettlement.Font = new Font("Times New Roman", 12f, FontStyle.Italic, GraphicsUnit.Point, 0);
            this.txtSettlement.LocationFloat = new PointFloat(501.333f, 508.7499f);
            this.txtSettlement.Name = "txtSettlement";
            this.txtSettlement.SerializableRtfString = manager.GetString("txtSettlement.SerializableRtfString");
            this.txtSettlement.SizeF = new SizeF(245.6666f, 18.83337f);
            this.txtSettlement.StylePriority.UseFont = false;
            this.picEmployee.BorderColor = Color.Silver;
            this.picEmployee.Borders = BorderSide.All;
            this.picEmployee.LocationFloat = new PointFloat(10.00096f, 121.75f);
            this.picEmployee.Name = "picEmployee";
            this.picEmployee.SizeF = new SizeF(90.20808f, 69.37503f);
            this.picEmployee.Sizing = ImageSizeMode.ZoomImage;
            this.picEmployee.StylePriority.UseBorderColor = false;
            this.picEmployee.StylePriority.UseBorders = false;
            this.xrLabel16.Font = new Font("Times New Roman", 12f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.xrLabel16.LocationFloat = new PointFloat(10.00053f, 224.5417f);
            this.xrLabel16.Name = "xrLabel16";
            this.xrLabel16.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel16.SizeF = new SizeF(245.2776f, 18.83334f);
            this.xrLabel16.StylePriority.UseFont = false;
            this.xrLabel16.Text = "TH\x00d4NG TIN SỰ VIỆC";
            this.xrLabel15.Font = new Font("Times New Roman", 12f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.xrLabel15.LocationFloat = new PointFloat(111.0557f, 123.5f);
            this.xrLabel15.Name = "xrLabel15";
            this.xrLabel15.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel15.SizeF = new SizeF(370.0846f, 18.83335f);
            this.xrLabel15.StylePriority.UseFont = false;
            this.xrLabel15.Text = "TH\x00d4NG TIN NGƯỜI LAO ĐỘNG";
            this.xrLabel14.Font = new Font("Times New Roman", 12f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.xrLabel14.LocationFloat = new PointFloat(10.00053f, 440.25f);
            this.xrLabel14.Name = "xrLabel14";
            this.xrLabel14.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel14.SizeF = new SizeF(245.2776f, 18.83334f);
            this.xrLabel14.StylePriority.UseFont = false;
            this.xrLabel14.Text = "H\x00ccNH THỨC KỶ LUẬT";
            this.txtReason.Font = new Font("Times New Roman", 12f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.txtReason.LocationFloat = new PointFloat(10.0003f, 550.4165f);
            this.txtReason.Name = "txtReason";
            this.txtReason.SerializableRtfString = manager.GetString("txtReason.SerializableRtfString");
            this.txtReason.SizeF = new SizeF(736.9995f, 23.41678f);
            this.txtReason.StylePriority.UseFont = false;
            this.txtNotes.Font = new Font("Times New Roman", 12f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.txtNotes.LocationFloat = new PointFloat(10.00096f, 407.3751f);
            this.txtNotes.Name = "txtNotes";
            this.txtNotes.SerializableRtfString = manager.GetString("txtNotes.SerializableRtfString");
            this.txtNotes.SizeF = new SizeF(736.9989f, 20.91669f);
            this.txtNotes.StylePriority.UseFont = false;
            this.txtForm.Font = new Font("Times New Roman", 12f, FontStyle.Italic, GraphicsUnit.Point, 0);
            this.txtForm.LocationFloat = new PointFloat(10.00031f, 482.9165f);
            this.txtForm.Name = "txtForm";
            this.txtForm.SerializableRtfString = manager.GetString("txtForm.SerializableRtfString");
            this.txtForm.SizeF = new SizeF(736.9993f, 20.91663f);
            this.txtForm.StylePriority.UseFont = false;
            this.txtWitnesses.Font = new Font("Times New Roman", 12f, FontStyle.Italic, GraphicsUnit.Point, 0);
            this.txtWitnesses.LocationFloat = new PointFloat(144.1538f, 342.8751f);
            this.txtWitnesses.Name = "txtWitnesses";
            this.txtWitnesses.SerializableRtfString = manager.GetString("txtWitnesses.SerializableRtfString");
            this.txtWitnesses.SizeF = new SizeF(602.8461f, 18.83337f);
            this.txtWitnesses.StylePriority.UseFont = false;
            this.txtDescription.Font = new Font("Times New Roman", 12f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.txtDescription.LocationFloat = new PointFloat(10.41668f, 316.875f);
            this.txtDescription.Name = "txtDescription";
            this.txtDescription.SerializableRtfString = manager.GetString("txtDescription.SerializableRtfString");
            this.txtDescription.SizeF = new SizeF(736.5833f, 18.83337f);
            this.txtDescription.StylePriority.UseFont = false;
            this.txtLocation.Font = new Font("Times New Roman", 12f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.txtLocation.LocationFloat = new PointFloat(183.7218f, 271.2083f);
            this.txtLocation.Name = "txtLocation";
            this.txtLocation.SerializableRtfString = manager.GetString("txtLocation.SerializableRtfString");
            this.txtLocation.SizeF = new SizeF(563.2781f, 18.83337f);
            this.txtLocation.StylePriority.UseFont = false;
            this.txtDateOccurred.Font = new Font("Times New Roman", 12f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.txtDateOccurred.LocationFloat = new PointFloat(260.0007f, 251.375f);
            this.txtDateOccurred.Name = "txtDateOccurred";
            this.txtDateOccurred.SerializableRtfString = manager.GetString("txtDateOccurred.SerializableRtfString");
            this.txtDateOccurred.SizeF = new SizeF(486.9992f, 18.83334f);
            this.txtDateOccurred.StylePriority.UseFont = false;
            this.txtPosition.Font = new Font("Times New Roman", 12f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.txtPosition.LocationFloat = new PointFloat(306.6385f, 169.125f);
            this.txtPosition.Name = "txtPosition";
            this.txtPosition.SerializableRtfString = manager.GetString("txtPosition.SerializableRtfString");
            this.txtPosition.SizeF = new SizeF(440.3615f, 18.83336f);
            this.txtPosition.StylePriority.UseFont = false;
            this.txtEmployeeName.Font = new Font("Times New Roman", 12f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.txtEmployeeName.LocationFloat = new PointFloat(260.0007f, 147.75f);
            this.txtEmployeeName.Name = "txtEmployeeName";
            this.txtEmployeeName.SerializableRtfString = manager.GetString("txtEmployeeName.SerializableRtfString");
            this.txtEmployeeName.SizeF = new SizeF(486.9992f, 18.83334f);
            this.txtEmployeeName.StylePriority.UseFont = false;
            this.xrTable1.Font = new Font("Times New Roman", 12f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.xrTable1.LocationFloat = new PointFloat(10.00018f, 592.8334f);
            this.xrTable1.Name = "xrTable1";
            this.xrTable1.Rows.AddRange(new XRTableRow[] { this.xrTableRow1, this.xrTableRow2 });
            this.xrTable1.SizeF = new SizeF(736.9994f, 35.41663f);
            this.xrTable1.StylePriority.UseFont = false;
            this.xrTableRow1.Cells.AddRange(new XRTableCell[] { this.xrTableCell1, this.xrTableCell2, this.xrTableCell3 });
            this.xrTableRow1.Name = "xrTableRow1";
            this.xrTableRow1.Weight = 1.0;
            this.xrTableCell1.Font = new Font("Times New Roman", 12f, FontStyle.Bold);
            this.xrTableCell1.Name = "xrTableCell1";
            this.xrTableCell1.StylePriority.UseFont = false;
            this.xrTableCell1.StylePriority.UseTextAlignment = false;
            this.xrTableCell1.Text = "Người lập b\x00e1o c\x00e1o";
            this.xrTableCell1.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell1.Weight = 1.0;
            this.xrTableCell2.Name = "xrTableCell2";
            this.xrTableCell2.Weight = 1.0;
            this.xrTableCell3.Font = new Font("Times New Roman", 12f, FontStyle.Bold);
            this.xrTableCell3.Name = "xrTableCell3";
            this.xrTableCell3.StylePriority.UseFont = false;
            this.xrTableCell3.StylePriority.UseTextAlignment = false;
            this.xrTableCell3.Text = "Gi\x00e1m đốc";
            this.xrTableCell3.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell3.Weight = 1.0;
            this.xrTableRow2.Cells.AddRange(new XRTableCell[] { this.xrTableCell4, this.xrTableCell5, this.xrTableCell6 });
            this.xrTableRow2.Name = "xrTableRow2";
            this.xrTableRow2.Weight = 1.0;
            this.xrTableCell4.Font = new Font("Times New Roman", 12f, FontStyle.Italic);
            this.xrTableCell4.Name = "xrTableCell4";
            this.xrTableCell4.StylePriority.UseFont = false;
            this.xrTableCell4.StylePriority.UseTextAlignment = false;
            this.xrTableCell4.Text = "( K\x00fd v\x00e0 ghi r\x00f5 họ t\x00ean)";
            this.xrTableCell4.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell4.Weight = 1.0;
            this.xrTableCell5.Name = "xrTableCell5";
            this.xrTableCell5.Weight = 1.0;
            this.xrTableCell6.Font = new Font("Times New Roman", 12f, FontStyle.Italic);
            this.xrTableCell6.Name = "xrTableCell6";
            this.xrTableCell6.StylePriority.UseFont = false;
            this.xrTableCell6.StylePriority.UseTextAlignment = false;
            this.xrTableCell6.Text = "( K\x00fd v\x00e0 ghi r\x00f5 họ t\x00ean)";
            this.xrTableCell6.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell6.Weight = 1.0;
            this.xrLabel13.Font = new Font("Times New Roman", 12f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.xrLabel13.LocationFloat = new PointFloat(10.00031f, 529.5832f);
            this.xrLabel13.Multiline = true;
            this.xrLabel13.Name = "xrLabel13";
            this.xrLabel13.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel13.SizeF = new SizeF(491.3328f, 20.375f);
            this.xrLabel13.StylePriority.UseFont = false;
            this.xrLabel13.Text = "Người lao động c\x00f3 giải th\x00edch g\x00ec khi để xảy ra sự việc? Nếu c\x00f3, ghi r\x00f5?\r\n";
            this.xrLabel12.Font = new Font("Times New Roman", 12f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.xrLabel12.LocationFloat = new PointFloat(10.00037f, 508.75f);
            this.xrLabel12.Name = "xrLabel12";
            this.xrLabel12.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel12.SizeF = new SizeF(491.3327f, 18.83328f);
            this.xrLabel12.StylePriority.UseFont = false;
            this.xrLabel12.Text = "Đ\x00e3 giải th\x00edch c\x00e1c h\x00e0nh động vi phạm của người lao động cho họ chưa?";
            this.xrLabel11.Font = new Font("Times New Roman", 12f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.xrLabel11.LocationFloat = new PointFloat(10.00037f, 463.0833f);
            this.xrLabel11.Name = "xrLabel11";
            this.xrLabel11.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel11.SizeF = new SizeF(401.5278f, 18.83334f);
            this.xrLabel11.StylePriority.UseFont = false;
            this.xrLabel11.Text = "H\x00ecnh thức kỷ luật n\x00e0o được \x00e1p dụng cho người lao động?";
            this.xrLabel10.Font = new Font("Times New Roman", 12f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.xrLabel10.LocationFloat = new PointFloat(10.00088f, 387.5417f);
            this.xrLabel10.Name = "xrLabel10";
            this.xrLabel10.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel10.SizeF = new SizeF(514.8465f, 18.83334f);
            this.xrLabel10.StylePriority.UseFont = false;
            this.xrLabel10.Text = "Nếu c\x00f3, n\x00eau r\x00f5 sự việc n\x00e0y vi phạm ch\x00ednh s\x00e1ch n\x00e0o v\x00e0 những vi phạm cụ thể";
            this.xrLabel9.Font = new Font("Times New Roman", 12f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.xrLabel9.LocationFloat = new PointFloat(10.00088f, 367.7084f);
            this.xrLabel9.Name = "xrLabel9";
            this.xrLabel9.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel9.SizeF = new SizeF(412.9855f, 18.83334f);
            this.xrLabel9.StylePriority.UseFont = false;
            this.xrLabel9.Text = "Sự việc n\x00e0y c\x00f3 vi phạm ch\x00ednh s\x00e1ch của c\x00f4ng ty hay kh\x00f4ng?";
            this.xrLabel8.Font = new Font("Times New Roman", 12f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.xrLabel8.LocationFloat = new PointFloat(10.00018f, 342.8751f);
            this.xrLabel8.Name = "xrLabel8";
            this.xrLabel8.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel8.SizeF = new SizeF(132.1536f, 18.83334f);
            this.xrLabel8.StylePriority.UseFont = false;
            this.xrLabel8.Text = "Người chứng kiến:";
            this.xrLabel7.Font = new Font("Times New Roman", 12f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.xrLabel7.LocationFloat = new PointFloat(10.00078f, 297.0417f);
            this.xrLabel7.Name = "xrLabel7";
            this.xrLabel7.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel7.SizeF = new SizeF(111.2068f, 18.83337f);
            this.xrLabel7.StylePriority.UseFont = false;
            this.xrLabel7.Text = "M\x00f4 tả sự việc:";
            this.xrLabel6.Font = new Font("Times New Roman", 12f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.xrLabel6.LocationFloat = new PointFloat(10.00072f, 271.2083f);
            this.xrLabel6.Name = "xrLabel6";
            this.xrLabel6.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel6.SizeF = new SizeF(173.7211f, 18.83334f);
            this.xrLabel6.StylePriority.UseFont = false;
            this.xrLabel6.Text = "Địa điểm xảy ra sự việc:";
            this.xrLabel5.Font = new Font("Times New Roman", 12f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.xrLabel5.LocationFloat = new PointFloat(10.00069f, 251.375f);
            this.xrLabel5.Name = "xrLabel5";
            this.xrLabel5.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel5.SizeF = new SizeF(250f, 18.83334f);
            this.xrLabel5.StylePriority.UseFont = false;
            this.xrLabel5.Text = "Ng\x00e0y th\x00e1ng/thời gian xảy ra sự việc:";
            this.xrLabel3.Font = new Font("Times New Roman", 12f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.xrLabel3.LocationFloat = new PointFloat(111.0557f, 169.125f);
            this.xrLabel3.Name = "xrLabel3";
            this.xrLabel3.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel3.SizeF = new SizeF(195.5828f, 18.83334f);
            this.xrLabel3.StylePriority.UseFont = false;
            this.xrLabel3.Text = "Chức danh người lao động:";
            this.xrLabel1.Font = new Font("Times New Roman", 12f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.xrLabel1.LocationFloat = new PointFloat(111.0557f, 147.75f);
            this.xrLabel1.Name = "xrLabel1";
            this.xrLabel1.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel1.SizeF = new SizeF(148.945f, 18.83334f);
            this.xrLabel1.StylePriority.UseFont = false;
            this.xrLabel1.Text = "T\x00ean người lao động:";
            this.xrLabel4.Font = new Font("Times New Roman", 16f, FontStyle.Bold);
            this.xrLabel4.ForeColor = Color.Black;
            this.xrLabel4.LocationFloat = new PointFloat(0f, 60.50001f);
            this.xrLabel4.Name = "xrLabel4";
            this.xrLabel4.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel4.SizeF = new SizeF(747f, 30.25004f);
            this.xrLabel4.StylePriority.UseFont = false;
            this.xrLabel4.StylePriority.UseForeColor = false;
            this.xrLabel4.StylePriority.UseTextAlignment = false;
            this.xrLabel4.Text = "B\x00c1O C\x00c1O KỶ LUẬT NGƯỜI LAO ĐỘNG";
            this.xrLabel4.TextAlignment = TextAlignment.MiddleCenter;
            this.txtCompany.Font = new Font("Times New Roman", 11f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.txtCompany.LocationFloat = new PointFloat(91.45851f, 0f);
            this.txtCompany.Name = "txtCompany";
            this.txtCompany.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtCompany.SizeF = new SizeF(655.5411f, 23.54167f);
            this.txtCompany.StylePriority.UseFont = false;
            this.txtCompany.Text = "txtCompany";
            this.txtDate.Font = new Font("Times New Roman", 10.25f, FontStyle.Italic);
            this.txtDate.LocationFloat = new PointFloat(0f, 92.62505f);
            this.txtDate.Name = "txtDate";
            this.txtDate.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtDate.SizeF = new SizeF(747f, 19.70835f);
            this.txtDate.StylePriority.UseFont = false;
            this.txtDate.StylePriority.UseTextAlignment = false;
            this.txtDate.Text = "(Căn cứ theo quyết định số:........../Ng\x00e0y:..............)";
            this.txtDate.TextAlignment = TextAlignment.MiddleCenter;
            this.xrLabel2.Font = new Font("Times New Roman", 11f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.xrLabel2.LocationFloat = new PointFloat(92.1538f, 23.54164f);
            this.xrLabel2.Name = "xrLabel2";
            this.xrLabel2.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel2.SizeF = new SizeF(56.00001f, 17.70835f);
            this.xrLabel2.StylePriority.UseFont = false;
            this.xrLabel2.Text = "Địa chỉ:";
            this.txtAddress.Font = new Font("Times New Roman", 11f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.txtAddress.LocationFloat = new PointFloat(148.1538f, 23.54167f);
            this.txtAddress.Name = "txtAddress";
            this.txtAddress.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtAddress.SizeF = new SizeF(598.8458f, 17.70833f);
            this.txtAddress.StylePriority.UseFont = false;
            this.txtAddress.Text = "txtAddress";
            this.ptPhoto.LocationFloat = new PointFloat(0f, 0f);
            this.ptPhoto.Name = "ptPhoto";
            this.ptPhoto.SizeF = new SizeF(88.54166f, 60.37498f);
            this.ptPhoto.Sizing = ImageSizeMode.ZoomImage;
            this.TopMargin.HeightF = 40f;
            this.TopMargin.Name = "TopMargin";
            this.TopMargin.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.TopMargin.TextAlignment = TextAlignment.TopLeft;
            this.BottomMargin.HeightF = 21f;
            this.BottomMargin.Name = "BottomMargin";
            this.BottomMargin.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.BottomMargin.TextAlignment = TextAlignment.TopLeft;
            this.PageFooter.HeightF = 2f;
            this.PageFooter.Name = "PageFooter";
            base.Bands.AddRange(new Band[] { this.Detail, this.TopMargin, this.BottomMargin, this.PageFooter });
            base.Font = new Font("Times New Roman", 9.75f);
            base.Margins = new Margins(40, 40, 40, 0x15);
            base.PageHeight = 0x491;
            base.PageWidth = 0x33b;
            base.PaperKind = PaperKind.A4;
            base.Version = "9.3";
            this.BeforePrint += new PrintEventHandler(this.xrptDisciplineByEmployee_BeforePrint);
            this.txtViolations.EndInit();
            this.txtSettlement.EndInit();
            this.txtReason.EndInit();
            this.txtNotes.EndInit();
            this.txtForm.EndInit();
            this.txtWitnesses.EndInit();
            this.txtDescription.EndInit();
            this.txtLocation.EndInit();
            this.txtDateOccurred.EndInit();
            this.txtPosition.EndInit();
            this.txtEmployeeName.EndInit();
            this.xrTable1.EndInit();
            this.EndInit();
        }

        private void LoadData()
        {
            HRM_PROCESS_DISCIPLINE hrm_process_discipline = new HRM_PROCESS_DISCIPLINE();
            hrm_process_discipline.Get(this.m_DisciplineID);
            if (hrm_process_discipline.DecideNumber.ToString() == "")
            {
                this.txtDate.Text = "(Căn cứ theo quyết định số:............/ Ng\x00e0y: " + hrm_process_discipline.Date.ToShortDateString() + ")";
            }
            else
            {
                this.txtDate.Text = "(Căn cứ theo quyết định số: " + hrm_process_discipline.DecideNumber.ToString() + " / Ng\x00e0y: " + hrm_process_discipline.Date.ToShortDateString() + ")";
            }
            this.txtEmployeeCode.Text = hrm_process_discipline.EmployeeCode;
            this.txtDateOccurred.Text = hrm_process_discipline.DateOccurred.ToShortDateString();
            this.txtLocation.Text = hrm_process_discipline.Location;
            this.txtDescription.Text = hrm_process_discipline.Description;
            this.txtWitnesses.Text = hrm_process_discipline.Witnesses;
            if (hrm_process_discipline.Violations)
            {
                this.txtViolations.Text = "C\x00f3";
            }
            else
            {
                this.txtViolations.Text = "Kh\x00f4ng";
            }
            this.txtNotes.Text = hrm_process_discipline.Notes;
            if (hrm_process_discipline.Settlement)
            {
                this.txtSettlement.Text = "C\x00f3";
            }
            else
            {
                this.txtSettlement.Text = "Kh\x00f4ng";
            }
            this.txtReason.Text = hrm_process_discipline.Reason;
            this.txtForm.Text = hrm_process_discipline.Form;
            HRM_EMPLOYEE hrm_employee = new HRM_EMPLOYEE();
            hrm_employee.Get(this.txtEmployeeCode.Text);
            this.picEmployee.Image = hrm_employee.Photo;
            this.txtEmployeeName.Text = hrm_employee.FirstName + " " + hrm_employee.LastName;
            this.txtPosition.Text = hrm_employee.Position;
        }

        private void xrptDisciplineByEmployee_BeforePrint(object sender, PrintEventArgs e)
        {
            this.LoadData();
            ////if (MyInfo.Get(MyEncryption.Encrypt("ERP01", "123654", true)) == "OK")
            {
                this.txtCompany.Text = "";//MyInfo.Company.ToUpper();
                this.txtAddress.Text = "";//MyInfo.Address;
                this.ptPhoto.Image = null;//MyInfo.Photo;
            }
        }
    }
}

